﻿using System;

namespace YiHaoHospitalPlatform.Model
{
    public class Inspect:BaseModel
    {
        /// <summary>
        /// 申请单号
        /// </summary>
        public string SQDDM { get; set; }
        /// <summary>
        /// 项目名称
        /// </summary>
        public string XMMC { get; set; }
        /// <summary>
        /// 预约时间
        /// </summary>
        public DateTime YYSJ { get; set; }
        /// <summary>
        /// 住院号
        /// </summary>
        public string ZYH { get; set; }
        /// <summary>
        /// 工具
        /// </summary>
        public int GJ { get; set; }
        /// <summary>
        /// 检查科室
        /// </summary>
        public string JCKS { get; set; }
        /// <summary>
        /// 检查类型
        /// </summary>
        public string JCLX { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }
            if ((obj.GetType().Equals(this.GetType())) == false)
            {
                return false;
            }
            Inspect temp = null;
            temp = (Inspect)obj;

            return this.SQDDM.Equals(temp.SQDDM) && this.XMMC.Equals(temp.XMMC) && this.YYSJ.Equals(temp.YYSJ)
                && this.ZYH.Equals(temp.ZYH) && this.GJ.Equals(temp.GJ) && this.JCKS.Equals(temp.JCKS) && this.JCLX.Equals(temp.JCLX);
        }

        //重写GetHashCode方法（重写Equals方法必须重写GetHashCode方法，否则发生警告

        public override int GetHashCode()
        {
            return this.SQDDM.GetHashCode() + this.XMMC.GetHashCode() + this.YYSJ.GetHashCode() + this.ZYH.GetHashCode() + this.GJ.GetHashCode() + this.JCKS.GetHashCode() + this.JCLX.GetHashCode();
        }
    }
}
